<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定时器简介</title>
</head>
<script type="text/javascript">
    window.onload = function () {
        var count = document.getElementById('count');

        for (var i = 1;i < 10;i++){
            count.innerHTML = i;
        };
    }
</script>
<body>
    <h1 id="count">1</h1>
</body>
</html>